//
//  YMWebView.swift
//  YMSwiftUI
//
//  Created by anscen on 2022/4/22.
//

import SwiftUI
import WebKit
//
//struct YMWebView: UIViewRepresentable {
//    @State var urlString :String
//    func makeUIView(context: Context) -> some UIView {
//        return WKWebView()
//    }
//    func updateUIView(_ uiView: UIViewType, context: Context) {
//        guard let url = URL(string: urlString) else { return }
//        let request = URLRequest(url:url)
//        if let webView = uiView as? WKWebView{
//            webView.load(request)
//        }
//    }
//}
//struct YMLabel :UIViewRepresentable{
//    var title :String
//    func makeUIView(context: Context) -> some UIView {
//        let label = UILabel()
//        label.font = UIFont.systemFont(ofSize: 20, weight: .medium)
//        label.textColor = UIColor.red
//        label.textAlignment = .center
//        label.text = title
//        return label
//    }
//    func updateUIView(_ uiView: UIViewType, context: Context) {
//        
//    }
//}
//struct YMNavigationViewController :UIViewControllerRepresentable{
//    var vc : UIViewController
//    func makeUIViewController(context: Context) -> some UIViewController {
//        let nvc = BaseNavigationController.init(rootViewController: vc)
//        return nvc
//    }
//    func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) {
////        if let nvc = uiViewController as? UINavigationController{
////            nvc.viewControllers.first?.title = title
////        }
//    }
//}



